    /**
      * $_[0]  = old_word
    * $_[1] = new_word
    */
    CREATE OR REPLACE FUNCTION plperl_string_diff (text, text) RETURNS diff_type AS $$
        require String::Diff;
        my ($old_word_result, $new_word_result) = String::Diff::diff($_[0] ,  $_[1]);
        return {old_word => $old_word_result, new_word => $new_word_result}
    $$ LANGUAGE plperlu;

    /**
    * $_[0]  = new_word
    * $_[1] = pattern
    */
    CREATE OR REPLACE FUNCTION plperl_match_regex (text, text) RETURNS boolean AS $$
        return $_[0] =~ $_[1]
    $$ LANGUAGE plperlu;

    /**
    * $_[0]  = old_data
    * $_[1] = new_data
    */
    CREATE OR REPLACE FUNCTION plperl_heuristic_data_match (text, text) RETURNS boolean AS $$
        return plperl_calculate_match_by_regex($_[0],$_[1]) > 1
    $$ LANGUAGE plperlu;

    CREATE OR REPLACE FUNCTION plperl_calculate_match_by_regex (text, text) RETURNS double AS $$
        my($var_diff) =
    $$ LANGUAGE plperlu;